import { createApp } from 'vue'
import { useRouter } from 'vue-router'
import app from './App.vue'

import router from './router'
import * as _ from 'lodash'

import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/src/index.scss'
// 引入汉化语言包
import locale from 'element-plus/lib/locale/lang/zh-cn'

async function render() {
  const App = createApp(app)

  App.config.globalProperties.$router = useRouter()
  App.config.globalProperties._ = _

  // 此处注入pinia全局管理state
  // App.use(ElementPlus, { locale }).use(router).use(pinia).mount('#app')
  App.use(ElementPlus, { locale }).use(router).mount('#app')
}

render()
